{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=436
  Verdict: Accepted
}
var x,y,x1,y1,x2,y2:extended;
function PointOnLine(x1,y1,x2,y2,x,y:double):boolean;
begin
result:=(sqrt(sqr(x2-x1)+sqr(y2-y1)))=(sqrt(sqr(x-x1)+sqr(y-y1))+sqrt(sqr(x-x2)+sqr(y-y2)));
end;
begin
assign(input,'input.txt');
assign(output,'output.txt');
reset(input);
rewrite(output);
read(x,y,x1,y1,x2,y2);
if pointonline(x1,y1,x2,y2,x,y) then write('YES') else write('NO');
end.